package com.spzx.manager.service.impl;

import com.spzx.common.log.service.AsyncOperLogService;
import com.spzx.manager.mapper.SysOperLogMapper;
import com.spzx.model.entity.system.SysOperLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * 实现日志保存
 * Project: spzx-parent
 * Package: com.spzx.manager.service.impl
 * Version: 1.0
 * <p>
 * Created by  wangjiaxin  on 2024/3/7 22:56
 */
@Service
public class AsyncOperLogServiceImpl implements AsyncOperLogService {
    @Autowired
    private SysOperLogMapper sysOperLogMapper;

    /**
     * // 异步执行保存日志操作
     *
     * @param sysOperLog
     */
    @Async
    @Override
    public void saveSysOperLog(SysOperLog sysOperLog) {
        sysOperLogMapper.insert(sysOperLog);
    }
}
